package com.example.springboot2.springbootSZP.controller;

import com.example.springboot2.springbootSZP.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import javax.validation.Valid;

@Controller
public class TestVaukdatir {

    @GetMapping("/test")
    public String showFrom(User user) {
        return "form";
    }



    @PostMapping("/test")
    public String checkUser(@Valid User user, BindingResult bindingResult, RedirectAttributes attributes) {
        return null;
    }
}

